package camera;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.hardware.Camera;
import android.hardware.Camera.PictureCallback;

import com.trip_memories.SavePicture;

public class PhotoHandler implements PictureCallback {

	private final Context context;

	public PhotoHandler(Context context) {
		this.context = context;
	}

	@Override
	public void onPictureTaken(byte[] data, Camera camera) {
		Intent intent = new Intent(context, SavePicture.class);
		intent.putExtra("bytes", data);
		context.startActivity(intent);
		((Activity) context).finish();

	}

}